package com.wqi.chapter7;

public class Adventure {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Hero i = new Hero();
		t(i);
		u(i);
		v(i);
		w(i);
	}
	static void t(CanFight x){x.fight();}
	static void u(CanSwim x){x.swim();}
	static void v(CanFly x){x.fly();}
	static void w(ActionCharacter x){x.fight();}
	
}

interface CanFight{void fight();}
interface CanSwim{ void swim();}
interface CanFly{ void fly();}
class ActionCharacter{ public void fight(){}}
class Hero extends ActionCharacter
	implements CanFight,CanSwim,CanFly{

	@Override
	public void swim() {	
	}

	@Override
	public void fly() {		
	}
	
}
